<%=  error_messages_for 'plan' %>

<!--[form:plan]-->
<p><label for="plan_nombre">Nombre del Plan</label><br/>
<%=  text_field 'plan', 'nombre'  %></p>

<% fields_for :plan do |f| %>
        <p><label for="plan_ini">Inicio:</label><br/>
		<%  f.calendar_date_select :ini, :popup => :force, :year_range=>3  %>
		<%=  f.date_select :ini, :order=>[:day,:month,:year], :start_year => -1.years.from_now.year, :end_year => 1.years.from_now.year, :include_blank => false %>
		</p>
		<p><label for="plan_fin">Fin:</label><br/>
		<%  f.calendar_date_select :fin, :popup => :force, :year_range=>3  %>
		<%=  f.date_select :fin, :order=>[:day,:month,:year], :start_year => -1.years.from_now.year, :end_year => 1.years.from_now.year, :include_blank => true %></p>
<% end %>

<p><label for="plan_alumno_id">Alumno</label><br/>
<%=  collection_select 'plan', 'alumno_id', Persona.find(:all, :conditions=>['coeficiente_id=',Coeficiente::ALUMNO].join, :order=>'nombres'), 'id', 'nombre_completo', :include_blank=>false,:prompt => 'Alumno...' %>
</p>

<p><label for="plan_vip">Vip</label><br/>
<select id="plan_vip" name="plan[vip]">
	<option value="false" <%=  "selected" if @plan.vip%>>False</option>
	<option value="true" <%=  "selected" if @plan.vip%>>True</option></select>
</p>

<p><label for="plan_obs">Obs</label><br/>

<%=  text_area 'plan', 'obs', :size=>"30x5"  %></p>
<label>Forma de pago:</label> <%= collection_select :plan,:forma_id, Forma.find(:all), "id", "nombre", :include_blank=>false %><br/>
<!--[eoform:plan]-->

